using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class APU_APU_ORDEN : PaginaBaseFormView
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string OrdenId = Request.QueryString.Get("Apu_Orden_Id");
            if (OrdenId != null)
            {
                fvapu_orden.DefaultMode = FormViewMode.ReadOnly;
                AsignarParametrosDataSourceDeatailsView(OrdenId);
            }
        }       
        base.Page_Load(sender, e);
        cargarBotones();
    }

    protected override Type TipoObjeto
    {
        get { return typeof(global::Apu_Orden); }
    }

    protected override FormView Fv
    {
        get { return fvapu_orden; }
    }

    protected override ObjectDataSource OdsDv
    {
        get { return odsfvapu_orden; }
    }

    protected override string Contenedor
    {
        get { return "APU_ORDEN"; }
    }

    private void cargarBotones()
    {
        BtnListado.Text = GetLocalResourceObject("BTN_APU_ORDEN_LISTADORecursoKCG.Text").ToString();
        BtnListado.ToolTip = GetLocalResourceObject("BTN_APU_ORDEN_LISTADORecursoKCG.ToolTip").ToString();        
    }    

    protected void BtnListado_Click(object sender, EventArgs e)
    {
        TextBox OrdenId = (TextBox)Fv.FindControl("Id");
        Response.Redirect("~/APU/APU_ORDEN_LISTADO.aspx?Apu_Orden_Id=" + OrdenId.Text);

    }
}
